﻿using System.ComponentModel.DataAnnotations;

namespace SingleBlog.Web.Areas.Admin.Models
{
    public class ChangePasswordViewModel
    {
        [Display(Name ="旧密码")]
        [Required(ErrorMessage ="请输入{0}")]
        [DataType(DataType.Password)]
        public string Password { get; set; }


        [Display(Name = "新密码")]
        [Required(ErrorMessage = "请输入{0}")]
        [MinLength(6, ErrorMessage = "{0}最少是{1}个字符")]
        [DataType(DataType.Password)]
        public string NewPassword { get; set; }

        [Display(Name = "确认密码")]
        [Required(ErrorMessage = "请输入{0}")]
        [Compare("NewPassword", ErrorMessage ="两次密码输入不一致")]
        [DataType(DataType.Password)]
        public string ConfirmPassword { get; set; }
    }
}
